﻿using KCPServer.Core.Net;

namespace KCPServer
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            var net = NetManager.Instance;
            net.Init();
            while (true)
            {
                try
                {
                    net.Update();
                    // Simulate some work
                    System.Threading.Thread.Sleep(100); // Sleep for 100 milliseconds   

                }
                catch (Exception e)
                {
                    Console.WriteLine($"An error occurred: {e.Message}");
                }


            }
        }
    }
}
